<{include file="common/header.tpl"}>
<section id="spread_one" class="column">
    <article class="module width_3_quarter">
        <header>
            <h3 class="tabs_involved " style="width:500px">机器列表：<{if $account_type!='limit'&&$parent==0}>共(<{$users|@count}>)个 <{/if}>
                <{if $type=='supermanager'}>
                [<a href="/user/add/merchant">添加</a>]
                <{/if}>
            </h3>
    </header>


		<div class="tab_container" style="padding: 2em;">
			<div id="tab1" class="tab_content">
			<table class="tablesorter" cellspacing="0"> 
			    <thead> 
                        <tr class="th">
                        <th>编号</th>
                        <th>名称</th>
                        <th>账号</th>
                        <th>手机</th>
                        <th>创建时间</th>
                        <th>备注</th>
                        <th>动作</th>
                        </tr>
                </thead>

                <tbody>
						<{foreach from=$users key=key item=item}>
						<tr>
                                                <td class="id" style="display:none;" ><{$item.uid}></td>
						<td class="tl" style="min-width:0px;width: 12%;max-width: 0px;"><{if $item.machine}><{$item.machine}><{else}>--<{/if}></td>
                                                <td style="min-width:0px;width: 12%;max-width: 0px;"><{$item.nickname}></td>
						<td style="min-width:0px;width: 23%;max-width: 0px;"><{$item.passport}></td>
						<td style="min-width:0px;width: 12%;max-width: 0px;"><{$item.mobile}></td>
						<td style="min-width:0px;width: 10%;max-width: 0px;"><{"Y-m-d"|@date:$item.create_time}></td>
						<td style="min-width:0px;width: 13%;max-width: 0px;"><{$item.comments}></td>
						<td style="min-width:0px;width: 10%;max-width: 0px;"><a href="/user/edit_user_base/<{$item.uid}>">编辑 </a>
                                                    <{if $item.uid != $current_id}>
                                                    /<a class="deleteRecord" href="javascript:;"> 关闭</a>
                                                    <{/if}></td>
                        </tr>
						<{/foreach}>
			    </tbody> 
			</table>
			</div><!-- end of #tab1 -->
		</div><!-- end of .tab_container -->
       <!-- <div class="pagination"><{$pagination}></div> -->

	<div class="clear"></div>
    </article><!-- end of content manager article -->
</section>
<script type="text/javascript">
    $(".deleteRecord").click(function()
    {
         var id = $(this).parent().parent().children(".id").text();
        if(confirm("你确定要关闭这个用户及其子账户吗？"))
        { 
            var id = $(this).parent().parent().children(".id").text();
            location.href = "/user/close_user_base/"+id;
        }
    });
</script>
<{include file="common/footer.tpl"}>
